/*
 * Copyright 2018 the original author or authors.
 *
 * you can use the file or import project.but Do not take legal responsibility. Only for learning
 * communication.
 *
 * Java compiled version 1.8 or higher
 *
 *
 *
 *
 */

package org.liang.javasource.bean;

/**
 * javaBean属性信息
 * 
 * @author houliang
 * @date 2018年3月5日
 */
public class BeanAttrsInfo implements Cloneable {
	private String name;// 读取的原始名称
	private String attrName;// 转换转换后的名称
	private String type;// 属性类型
	private String comment = "";// 属性注释，默认
	private String commentDesc = "";// 详细注释
	private boolean constParam; // 是否构造传参

	public BeanAttrsInfo(String name, String attrName, String type,
			String comment, String commentDesc, boolean constParam) {
		this.name = name;
		this.attrName = attrName;
		this.type = type;
		this.constParam = constParam;
		if (comment != null) {
			this.comment = comment;
		}
		if (commentDesc != null) {
			this.commentDesc = commentDesc;
		}
	}

	public String getName() {
		return name;
	}

	public String getType() {
		return type;
	}

	public String getComment() {
		return comment;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setType(String type) {
		this.type = type;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	public String getAttrName() {
		return attrName;
	}

	public void setAttrName(String attrName) {
		this.attrName = attrName;
	}

	public String getCommentDesc() {
		return commentDesc;
	}

	public void setCommentDesc(String commentDesc) {
		this.commentDesc = commentDesc;
	}

	public boolean isConstParam() {
		return constParam;
	}

	public void setConstParam(boolean constParam) {
		this.constParam = constParam;
	}

	@Override
	protected BeanAttrsInfo clone() throws CloneNotSupportedException {

		return (BeanAttrsInfo) super.clone();
	}
}
